package com.dyw.springboot03.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.core.env.Environment;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import org.yaml.snakeyaml.Yaml;

/**
 * Devil
 *
 * @author Devil
 * @create 2022-01-20-22:02
 */

@RestController
public class Controller01 {
    @Value("${Country}")
    private String cty;

    @Autowired
    private Environment env;
    @GetMapping
    public void outCty(){
        System.out.println(cty);
        System.out.println(env.getProperty("server.port"));
        System.out.println(env.getProperty("Country"));
    }
}
